home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 151-175 / scopedisk168 / asmmacros / am_02 / doclicmd.i < prev    next >
Text File  |  1995-03-19  |  1KB  |  43 lines

  1.      NOLIST
  2. DoCLICmd    MACRO              ; 14 Jan 88
  3. *------------------------------; Start of DoCLICmd macro.
  4.      CLR.L D2                  ; Make D2 indicate "execute from command
  5.                                ;  string only".
  6.      NOLIST
  7.      IFEQ NARG-2               ; If the output file handle is specified, then
  8.      LIST
  9.                                ; Make D3 indicate the output file handle.
  10.      NOLIST
  11.      IFEQ ReEntrant-1
  12.      LIST
  13.      MOVE.L \2(A5),D3
  14.      NOLIST
  15.      ENDC
  16.      IFNE ReEntrant-1
  17.      LIST
  18.      MOVE.L \2,D3
  19.      NOLIST
  20.      ENDC
  21.      ENDC
  22.      IFEQ NARG-1               ; If no output file handle is specified, then
  23.      LIST
  24.      CLR.L D3                  ; Clear D3 so that output will go to the
  25.                                ;  current window.
  26.      NOLIST
  27.      ENDC
  28.      LIST
  29.                                ; Make D1 point to the command buffer.
  30.      MOVE.L #\1,D1
  31.      NOLIST
  32.      IFEQ ReEntrant-1
  33.      LIST
  34.      ADD.L A5,D1
  35.      NOLIST
  36.      ENDC
  37.      LIST
  38.      CallLib Execute,dos       ; Call Execute to do the CLI command.
  39.      TST.L D0                  ; Make the zero flag indicate failure.
  40. *------------------------------; End of DoCLICmd macro.
  41.      ENDM
  42.      LIST
  43.